<?php
class MHDEV_View_Helper_GetAuthor extends Zend_View_Helper_Abstract
{
	public function GetAuthor($uid)
	{
		// db
		$user	= new User();
		
		// query
		$query	= $user->find($uid);
		

		if($query->count() > 0)
		{
			$result = $query->toArray();
			return htmlentities($result[0]['username']);
		}
		else
		{
			return Zend_Register::get('lang')->_('guest');
		}
	}
}